﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BaseEntities;

namespace DataAccess
{
    public class ValidationAccess
    {
        public static bool ValidateCard(Card card)
        {
            bool check = false;
            if (DataAccess.ExeStoredValidCard("sp_ValidCard", card) == true)
            {
                check = true;
            }
            else
            {
                check = false;
            }
            return check;
        }

        public static bool ValidatePIN(Card card)
        {
            bool check = false;
            if (DataAccess.ExeStoredValidPIN("sp_ValidPIN", card) == true)
            {
                check = true;
            }
            else
            {
                check = false;
            }
            return check;
        }

        public static bool UpdateAttemp(Card card)
        {
            bool check = false;
            if (DataAccess.ExeStoredUpdateAttempt("sp_UpdateAttempt", card) == true)
            {
                check = true;
            }
            else
            {
                check = false;
            }
            return check;
        }

        public static bool ResetAttempt(Card card)
        {
            bool check = false;
            if (DataAccess.ExeStoredResetAttempt("sp_ResetAttempt", card) == true)
            {
                check = true;
            }
            else
            {
                check = false;
            }
            return check;
        }

        public static bool UpdateStatus(Card card)
        {
            bool check = false;
            if (DataAccess.ExeStoredUpdateStatus("sp_UpdateStatus", card) == true)
            {
                check = true;
            }
            else
            {
                check = false;
            }
            return check;
        }
    }
}
